<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">

<title>顶新增</title>
<script type="text/javascript" src="js/form.js"></script>
<style>
	
</style>

<script type="text/javascript">
var approvalCountRoof = 0;
	function initDecorationProof(v){
		//赋值前先重置表单
		$("#decorationProofAddForm input").val("");
		$("#decorationProofAddForm div[id^='list']").find("*").remove();
		$("#decorationProofAddForm #dp_div").hide();
		//去除只读开启按钮编辑
		$("#decorationProofAddForm").find("input,textarea").attr("readonly", false);
		$("#decorationProofAddForm").find("select,.addbtn").attr("disabled", false);
		$("#decorationProofAddForm div[id^='filePicker_']").css("display","inline-block").unbind("click");
		$("#decorationProofAddForm #btn_div1").show();
		$("#decorationProofAddForm #btn_div2").hide();
		//开始赋值数据
		if(v){
			getFiles(v.id);
			approvalCountRoof = v.approvalCount;
			$("#decorationProofAddForm #entityId_proofId").val(v.id);
			$("#roomType").val(v.roomType);//房屋类型
			$("#decorationProofAddForm #illumination").val(v.illumination);//照明
			$("#decorationProofAddForm #windExit").val(v.windExit);//新出风口
			$("#decorationProofAddForm #returnWindExit").val(v.returnWindExit);//回风口
			$("#decorationProofAddForm #smogDetector").val(v.smogDetector);//烟雾探测器
			$("#decorationProofAddForm #tempDetector").val(v.tempDetector);//温度探测器
			$("#decorationProofAddForm #infraredDetector").val(v.infraredDetector);//红外探测器
			$("#decorationProofAddForm #mixtureDetector").val(v.mixtureDetector);//复合探测器
			$("#decorationProofAddForm #gasDetector").val(v.gasDetector);//燃气报警器
			$("#decorationProofAddForm #spray").val(v.spray);//喷淋
			$("#decorationProofAddForm #decorateMaterials").val(v.decorateMaterials);//装饰材料
			$("#decorationProofAddForm #lampPool").val(v.lampPool);//灯池
			//$("#decorationProofAddForm #decorationProofAdd_articleId").val();//附件
			$("#decorationProofAddForm #airOutlet").val(v.airOutlet);//排風口
			$("#decorationProofAddForm #ceiling").val(v.ceiling);//吊顶
			$("#decorationProofAddForm #clothesline").val(v.clothesline);//晾衣杆
			$("#decorationProofAddForm #yuba").val(v.yuba);//浴霸
			$("#decorationProofAddForm #ventilator").val(v.ventilator);//浴霸
			//隐藏按钮
			$("#decorationProofAddForm #btn_div2").show();
			$("#decorationProofAddForm #btn_div1").hide();
			$("#decorationProofAddForm").find("input,textarea").attr("readonly", true);
			$("#decorationProofAddForm").find(".addbtn,select").attr("disabled", true);
			//禁止点击上传按钮
			$("#decorationProofAddForm div[id^='filePicker']").unbind("click").click(function(){
				return false;
			}).hide();
		}
	}
	
	//展示附件
	function getFiles(id) {
		var proofId = id;
		getFileList(proofId, "装修验收顶-照明", "#list_illumination",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-新出风口", "#list_windExit",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-回风口", "#list_returnWindExit",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-烟雾探测器", "#list_smogDetector",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-温度探测器", "#list_tempDetector",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-红外探测器", "#list_infraredDetector",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-复合探测器", "#list_mixtureDetector",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-燃气报警器", "#list_gasDetector",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-喷淋", "#list_spray",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-装饰材料", "#list_decorateMaterials",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-灯池", "#list_lampPool",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-吊顶", "#list_condoleTop",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-晾衣杆", "#list_clotheslinePole",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-排风口", "#list_airOutlet",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-浴霸", "#list_bathBully",roofImgRemove, imgPlus);
		getFileList(proofId, "装修验收顶-排风扇", "#list_fan",roofImgRemove, imgPlus);
	}
	
	//图片删除事件
	//var roofArray=new Array();//记录待删除附件,移动到验收首页
	function roofImgRemove(id){
		layer.confirm('删除该图片？',{
				title:'警告',
				icon:0,
				shade:[0.1, '#fff']
			},function(){
				roofArray.push(id);
				//删除指定缩略图
				$("#"+id).remove();
				layer.close(layer.index);
			});
	}
	
	var optProof;
	//optEvent操作字段，0：临时保存；1：新增；2：修改
	function saveProof(val) {
		optProof = val;
		if (val == 3) {
			if(approvalCountRoof == 0){
				//解除锁定状态
				var index = layer.confirm('确定开启编辑状态？', {
					offset : '20%',
					shade : 0
				}, function() {
					$("#dp_div").show();
					//去除只读开启按钮编辑
					$("#decorationProofAddForm").find("input,textarea").attr("readonly", false);
					$("#decorationProofAddForm").find("select,.addbtn").attr("disabled", false);
					$("#decorationProofAddForm div[id^='filePicker']").unbind("click").show();
					//上传按钮解除
					$("#decorationProofAddForm #modifyBtn").hide();
					$("#decorationProofAddForm .hidbtn").addClass("showbtn");
					$("#decorationProofAddForm span.uploadcancel").show();
					layer.close(index);
				});
			}else{
				layer.msg("此条数据已提交过审批，不能重复提交");
			}
		} else {

			$("#decorationProofAddForm").submit();
		}
	}
</script>
</head>

<body>
<div class="contentt">
	<form class="cmxform" id="decorationProofAddForm" method="post" action="decorationProof/addDecorationProof">
	
		<div class="top" style="border-bottom: 1px solid gray;height: 35px;margin-bottom: 15px">
			<span class="style_btn" style="width:100px;">顶</span>
		</div>
		<div class="main-top">
			<div style="width: 100%;">
				<table width="100%">
					<tr>
						<td class="leftt"><span class="style_btn"
							style="width:100px;">照明</span></td>
						<td width="360"><input type="text" name="illumination" id="illumination">
							<!-- 照明 上传按钮 -->
	    					<div id='filePicker_illumination' style="display:none">上传</div>
						</td>
						<td class="leftt cantingHide"><span class="style_btn"
							style="width:100px;">喷淋</span></td>
						<td class=" cantingHide" width="360"><input type="text" name="spray" id="spray">
							<!-- 喷淋 上传按钮 -->
	    					<div id='filePicker_spray' style="display:none">上传</div>
						</td>
					</tr>
					<tr class="yangtaiHide">
						<td colspan="2" width="50%">
							<!-- 附件上传 照明。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_illumination'></div>
						</td>
						<td colspan="2" width="50%">
							<!-- 附件上传 喷淋。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_spray'></div>
						</td>
					</tr>
					<tr class="xuanguanHide weishengjianHide yangtaiHide">
						<td class="leftt"><span class="style_btn"
							style="width:100px;">新风出口</span></td>
						<td><input type="text" name="windExit" id="windExit">
							<!--新风出口 上传按钮 -->
	    					<div id='filePicker_windExit' style="display:none">上传</div>
						</td>
						<td class="leftt"><span class="style_btn"
							style="width:100px;">回风口</span></td>
						<td><input type="text" name="returnWindExit" id="returnWindExit">
							<!--回风口 上传按钮 -->
	    					<div id='filePicker_returnWindExit' style="display:none">上传</div>
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<!-- 附件上传 新风出口。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_windExit'></div>
						</td>
						<td colspan="2">
							<!-- 附件上传 回风口。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_returnWindExit'></div>
						</td>
					</tr>
					<tr>
						<td class="leftt xuanguanHide qijushiHide cantingHide chufangHide chuwujianHide yangtaiHide"><span class="style_btn"
							style="width:100px;">排风口</span></td>
						<td class="xuanguanHide qijushiHide cantingHide chufangHide chuwujianHide yangtaiHide"><input type="text" name="airOutlet" id="airOutlet">
							<!--排风口 上传按钮 -->
	    					<div id='filePicker_airOutlet' style="display:none">上传</div>
						</td>
						
						<td class="leftt"><span class="style_btn" style="width:100px;">装饰材料</span></td>
						<td><input type="text" name="decorateMaterials" id="decorateMaterials">
							<!--装饰材料 上传按钮 -->
	    					<div id='filePicker_decorateMaterials' style="display:none">上传</div>
						</td>

					</tr>
					<tr>
					<td colspan="2" class="xuanguanHide qijushiHide cantingHide chufangHide chuwujianHide yangtaiHide" >
							<!-- 附件上传 排风口 。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_airOutlet'></div>
						</td>
						<td colspan="2">
							<!-- 附件上传 装饰材料。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_decorateMaterials'></div>
						</td>
						
					</tr>
					<tr>
						<td class="leftt"><span class="style_btn"
							style="width:100px;">消防探测</span></td>
						<td></td>

					</tr>

					<tr>
						<td class="leftt">烟雾探测器</td>
						<td><input type="text" name="smogDetector" id="smogDetector">
							<!--烟雾探测器 上传按钮 -->
	    					<div id='filePicker_smogDetector' style="display:none">上传</div
						</td>
						<td class="leftt">温度探测器</td>
						<td><input type="text" name="tempDetector" id="tempDetector">
							<!--温度探测器  上传按钮 -->
	    					<div id='filePicker_tempDetector' style="display:none">上传</div>
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<!-- 附件上传 烟雾探测器。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_smogDetector'></div>
						</td>
						<td colspan="2">
							<!-- 附件上传温度探测器。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_tempDetector'></div>
						</td>
					</tr>
					<tr>
						<td class="leftt">红外探测器</td>
						<td><input type="text" name="infraredDetector" id="infraredDetector">
							<!--红外探测器  上传按钮 -->
	    					<div id='filePicker_infraredDetector' style="display:none">上传</div>
						</td>
						<td class="leftt">复合探测器</td>
						<td><input type="text" name="mixtureDetector" id="mixtureDetector">
							<!-- 上传按钮 -->
	    					<div id='filePicker_mixtureDetector' style="display:none">上传</div>
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<!-- 附件上传红外探测器。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_infraredDetector'></div>
							
						</td>
						<td  colspan="2">
							<!-- 附件上传复合探测器。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_mixtureDetector'></div>
						</td>
					</tr>
					<tr>
						<td class="leftt">燃气报警器</td>
						<td><input type="text" name="gasDetector" id="gasDetector">
							<!--燃气报警器  上传按钮 -->
	    					<div id='filePicker_gasDetector' style="display:none">上传</div>
						</td>

					</tr>
					<tr>
						<td colspan="2">
							<!-- 附件上传 燃气报警器。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_gasDetector'></div>
						</td>
						<td colspan="2"></td>
					</tr>

					
					<tr>
						<td class="leftt"><span class="style_btn"
							style="width:100px;">悬挂物</span></td>
						<td></td>
					</tr>
					<tr class="chuwujianHide weishengjianHide cantingHide">
						<td class="leftt">吊顶</td>
						<td class="weishengjianHide"><input type="text" name="ceiling" id="ceiling">
							<!--吊顶上传按钮 -->
	    					<div id='filePicker_condoleTop' style="display:none">上传</div
						</td>
						<td class="leftt weishengjianHide">晾衣杆</td>
						<td class="weishengjianHide"><input type="text" name="clothesline" id="clothesline">
							<!--晾衣杆  上传按钮 -->
	    					<div id='filePicker_clotheslinePole' style="display:none">上传</div>
						</td>
					</tr>
					<tr class="chuwujianHide cantingHide">
						<td colspan="2">
							<!-- 附件上传 吊顶。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_condoleTop'></div>
						</td>
						<td colspan="2">
							<!-- 附件上传晾衣杆。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_clotheslinePole'></div>
						</td>
					</tr>
					<tr class="chuwujianHide cantingHide">
						<td class="leftt">浴霸</td>
						<td><input type="text" name="yuba" id="yuba">
							<!--浴霸上传按钮 -->
	    					<div id='filePicker_bathBully' style="display:none">上传</div
						</td>
						<td class="leftt">排风扇</td>
						<td><input type="text" name="ventilator" id="ventilator">
							<!--排风扇  上传按钮 -->
	    					<div id='filePicker_fan' style="display:none">上传</div>
						</td>
					</tr>
					<tr class="chuwujianHide cantingHide">
						<td colspan="2">
							<!-- 附件上传浴霸。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_bathBully'></div>
						</td>
						<td colspan="2">
							<!-- 附件上传排风扇。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_fan'></div>
						</td>
					</tr>
					<tr>
						<td class="leftt">灯池</td>
						<td><input type="text" name="lampPool" id="lampPool">
							<!--灯池  上传按钮 -->
	    					<div id='filePicker_lampPool' style="display:none">上传</div>
						</td>
						
					</tr>
					<tr>
						<td colspan="2">
							<!-- 附件上传 灯池。。。-->
							<!-- 缩略图容器 -->
	    					<div id='list_lampPool'></div>
						</td>
						<td colspan="2"></td>
					</tr>

				</table>
			</div>
			<!-- 修改时添加变更说明 -->
			<div style="margin:10px;display:none;" id="dp_div" >
				变更说明<textarea rows="3" name="remark" id="dpRemark" style="width:70%"></textarea><span style="color:red;">*</span>
			</div>
			<input type="hidden" id="entityId_proofId" name="">
			<div style="width:100%;text-align:center; padding-top:20px"class="anniu">
				<div id="btn_div1" style="display:none">
					<button class="btn btn-danger radius my-btn" onclick="saveProof(0)"
						type="button">提交</button>
					<button class="btn btn-danger radius my-btn" onclick="saveProof(1)"
						type="button">保 存</button>
					<a class="btn btn-default radius"
						onClick="resetForm(this);"> 重置 </a> <br />
				</div>
				<div id="btn_div2" style="display:none;">
					<shiro:hasPermission name="permission:edit"> 
						<button id="modifyBtn" type="button"
							class="btn btn-danger radius my-btn" onclick="saveProof(3)">启用编辑</button>
						<button class="btn btn-danger radius my-btn hidbtn"
							onclick="saveProof(2)" type="button">保存修改</button>
						<a class="btn btn-default radius hidbtn"
							onClick="resetForm(this);">重置</a>
					</shiro:hasPermission> 
				</div>
			</div>
			<!-- anniu end -->
		</div>
		<!-- main end  -->

	
	<!-- 隐藏域 -->
	<div style="display:none;">
		<input type="hidden" id="decorationProofAdd_articleId" > 
	</div>
	</form>
	<div style="padding: 5px" class="changeTable">
			<!-- 信用信息更改字段列表 -->
			<table id="decProofChageTable" style="table-layout:fixed"></table>
		</div>
	</div>
	<!--contentt end  -->
	<script type="text/javascript">
		$(function() {
			//$("div[id^='filePicker_']").css("display","inline-block");
			$(".js-example-tags").select2({
				tags : true //可搜索
			})
			//初始化上传插件
			//参数说明：上传按钮id、缩略图容器id、物件id、存放上传文件信息隐藏域id、成功回调、失败回调
			initWebUpload("filePicker_illumination", "list_illumination", "装修验收顶-照明", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_windExit", "list_windExit", "装修验收顶-新出风口", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_returnWindExit", "list_returnWindExit", "装修验收顶-回风口", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_smogDetector", "list_smogDetector", "装修验收顶-烟雾探测器", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_tempDetector", "list_tempDetector", "装修验收顶-温度探测器", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_infraredDetector", "list_infraredDetector", "装修验收顶-红外探测器", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_mixtureDetector", "list_mixtureDetector", "装修验收顶-复合探测器", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_gasDetector", "list_gasDetector", "装修验收顶-燃气报警器", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_spray", "list_spray", "装修验收顶-喷淋", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_decorateMaterials", "list_decorateMaterials", "装修验收顶-装饰材料", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_lampPool", "list_lampPool", "装修验收顶-灯池", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_condoleTop", "list_condoleTop", "装修验收顶-吊顶", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_clotheslinePole", "list_clotheslinePole", "装修验收顶-晾衣杆", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_airOutlet", "list_airOutlet", "装修验收顶-排风口", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_bathBully", "list_bathBully", "装修验收顶-浴霸", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
			initWebUpload("filePicker_fan", "list_fan", "装修验收顶-排风扇", "decorationProofAdd_articleId", decorationProofSuccess, decorationProofErr);
	
			$("div[id^='filePicker_'] div").css({
				"width" : "60px",
				"height" : "30px"
			});
			mySubmit("decorationProofAddForm", saveDecorationProof, decorationProofAddSuccess);
		//初始化表格,动态从服务器加载数据  
		 $("#decProofChageTable").bootstrapTable({
				method : "post", //使用get请求到服务器获取数据  
				url : "decorationProof/getDecProofChangeList", //获取数据的Servlet地址  
				striped : true, //表格显示条纹  
				pagination : true, //启动分页  
				pageSize : 2, //每页显示的记录数  
				pageNumber : 1, //当前第几页  
				pageList : [ 5, 10, 15, 20, 25 ], //记录数可选列表  
				sidePagination : "server", //表示服务端请求  
				contentType : 'application/x-www-form-urlencoded',
				//设置为undefined可以获取pageNumber，pageSize，searchText，sortName，sortOrder  
				//设置为limit可以获取limit, offset, search, sort, order  
				queryParamsType : "undefined",
				queryParams : function queryParams(params) { //设置查询参数  
					var param = {
						pageNumber : params.pageNumber,
						pageSize : params.pageSize,
						fkcustomerId : fkcustomerId,
						fkroomId : fkroomId
					};
					return param;
				},
				columns : [ {
					field : 'createtime',
					title : '修改时间',
					width : '15%',
					formatter:decProofDataFormat
				}, {
					field : 'fieldname',
					title : '修改字段',
					width : '8%'
				}, {
					field : 'changebefore',
					title : '修改前数据',
					width : '25%',
					formatter:showText	
				}, {
					field : 'changeafter',
					title : '修改后数据',
					width : '25%',
					formatter:showText	
				}, {
					field : 'adduser',
					title : '修改人',
					width : '7%',
				}, {
					field : 'remarks',
					title : '变更说明',
					width : '20%',
					formatter:showText	
				} ]
			});
		 	var history = parent.$("#history").val();
			if(history == 'yes'){
				//隐藏按钮
				$("#decorationProofAddForm #btn_div2").css("display","none");
				$("#decorationProofAddForm #btn_div1").hide();
				$("#decorationProofAddForm").find("input,textarea").attr("readonly", true);
				$("#decorationProofAddForm").find(".addbtn,select").attr("disabled", true);
				//禁止点击上传按钮
				$("#decorationProofAddForm div[id^='filePicker']").unbind("click").click(function(){
					return false;
				}).hide();
			}
		});
		//日期格式化
		function decProofDataFormat(value, row, index) {
			return new Date(row.createtime).format("yyyy-MM-dd hh:mm:ss");
		}
		//保存成功回调
		function decorationProofAddSuccess(responseText){
			layer.close(layer.index);
			if (responseText.success) {
				layer.alert("保存成功！", {
					offset:'20%',
					shade:[0.1,'#fff']
				}, function() {
					parent.tabToken=3;
					parent.houseType=$("#roomType").val();
					location.reload();
				});
			} else {
				layer.alert('保存失败！');
			}
		}
		//保存信息
		function saveDecorationProof(){
			var proof = layer.load(2);
			var proofId = $("#decorationProofAddForm #entityId_proofId").val();
			//房间号、客户id预留
			var fkcustomerId= parent.$("#customerId").val();
			var fkroomId = parent.$("#roomId").val();
			var roomType=$("#roomType").val();//房屋类型
			var illumination=$("#decorationProofAddForm #illumination").val();//照明
			var windExit=$("#decorationProofAddForm #windExit").val();//新出风口
			var returnWindExit=$("#decorationProofAddForm #returnWindExit").val();//回风口
			var smogDetector=$("#decorationProofAddForm #smogDetector").val();//烟雾探测器
			var tempDetector=$("#decorationProofAddForm #tempDetector").val();//温度探测器
			var infraredDetector=$("#decorationProofAddForm #infraredDetector").val();//红外探测器
			var mixtureDetector=$("#decorationProofAddForm #mixtureDetector").val();//复合探测器
			var gasDetector=$("#decorationProofAddForm #gasDetector").val();//燃气报警器
			var spray=$("#decorationProofAddForm #spray").val();//喷淋
			var decorateMaterials=$("#decorationProofAddForm #decorateMaterials").val();//装饰材料
			var lampPool=$("#decorationProofAddForm #lampPool").val();//灯池
			var AccessoryCaList =$("#decorationProofAddForm #decorationProofAdd_articleId").val();//附件
			var airOutlet = $("#decorationProofAddForm #airOutlet").val();//排風口
			var ceiling = $("#decorationProofAddForm #ceiling").val();//吊顶
			var clothesline = $("#decorationProofAddForm #clothesline").val();//晾衣杆
			var yuba = $("#decorationProofAddForm #yuba").val();//浴霸
			var ventilator = $("#decorationProofAddForm #ventilator").val();//浴霸
			var remark = $("#dpRemark").val();
			if(optProof == "2"){
				if(remark == "" || remark == undefined){
					layer.msg("变更说明不能为空");
					layer.close(proof);
					return null;
				}
			}
		    var jsonData= {
					id:proofId,
					wailDelFile:roofArray,
		        	fkcustomerId:fkcustomerId,
		        	fkroomId:fkroomId,
		        	roomType:roomType,
		        	illumination:illumination,
		        	windExit:windExit,
		        	returnWindExit:returnWindExit,
		        	smogDetector:smogDetector,
		        	tempDetector:tempDetector,
		        	infraredDetector:infraredDetector,
		        	mixtureDetector:mixtureDetector,
		        	gasDetector:gasDetector,
		        	spray:spray,
		        	decorateMaterials:decorateMaterials,
		        	lampPool:lampPool,
		        	airOutlet:airOutlet,
		        	ceiling:ceiling,
		        	clothesline:clothesline,
		        	yuba:yuba,
		        	ventilator:ventilator,
		        	AccessoryCaList:AccessoryCaList,
		        	opt : optProof,
		        	remark:remark
	        };
        return jsonData;
	}
	
		//上传成功回调
		function decorationProofSuccess(file, response) {
			successImg(file.id);
		}
		//上传失败回调
		function decorationProofErr(file, data) {
			//alert("上传失败回调");
		}
	</script>
</body>
</html>